<?php
include_once '../info_struct.php';
include_once 'input.php';
include_once 'output.php';
include_once '../Process_Data/process_data.php';

/*$doi = new infos();
$doi->doi = "10.1112/plms/s2-42.1.230";
$refs = process_doi($doi);
$ref = $refs[0];
$ref->note_title = "Kommentar zu On Computable Numbers";
$ref->note = "Dies ist ein Kommentar zu Testzwecken.";*/

/*$ref = new infos();
$ref->title = "Test for BC Function";
$ref->author = "Adrian";
$ref->year = "200";
$ref->bc = true;
*/
$ref1 = new infos();
$ref1->title = "Test without BC";
$ref1->author = "Adrian";
$ref1->year = "2014"; 

$ref = ldb_get_by_id(13);
$ref->title = "neuer titel";

if (add_ref($ref)) {
    echo ("Success");
} else {
    echo ("Failure");
}

if (add_ref($ref1)) {
    echo ("Success");
} else {
    echo ("Failure");
}